package com.classes.field;

import java.nio.ByteBuffer;

import com.classes.CMN;

/**
 * @author chuer
 * @version V1.0
 * @Description: 字段表集合
 * @date 2015年4月24日 上午10:42:30
 */
public class FiledTable {

    public static void fieldInfo(ByteBuffer buffer) {

        short fieldsLength = buffer.getShort();
        System.out.println("字段长度：" + fieldsLength);
        for (int i = 0; i < fieldsLength; i++) {
            short accessFlag = buffer.getShort();
            short nameIndex = buffer.getShort();
            short descIndex = buffer.getShort();
            short attributesCount = buffer.getShort();


            int[] is = CMN.fieldAccessFlagMap.get(accessFlag + "");
            for (int flag : is) {
                System.out.print("字段访问标识" + FiledAccessFlagEnum.getFlag(flag));
            }

            System.out.println("  nameIndex=" + nameIndex + " descIndex=" + descIndex + " attributesCount=" + attributesCount);
        }


    }
}
